package com.cwvs.cat.myview;

import android.app.DialogFragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.cwvs.cat.ClubChatRoomActivity;
import com.cwvs.cat.R;
import com.cwvs.cat.ShakeDetailActivity;

public class MyDialogApplyDetail extends DialogFragment implements OnClickListener {

	private LinearLayout np_active_number;
	private ImageView img_dialog_chat,img_dialog_shake;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);
		View v = inflater.inflate(R.layout.dialog_apply_detail, container,
				false);
		initView(v);
		return v;
	}

	private void initView(View view) {
		img_dialog_chat=(ImageView) view.findViewById(R.id.img_dialog_chat);
		img_dialog_chat.setOnClickListener(this);
		img_dialog_shake=(ImageView) view.findViewById(R.id.img_dialog_shake);
		img_dialog_shake.setOnClickListener(this);

	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		Intent intent=new Intent();
		switch (v.getId()) {
		case R.id.img_dialog_chat:
			intent.setClass(getActivity(), ClubChatRoomActivity.class);
			startActivity(intent);
			break;
			
		case R.id.img_dialog_shake:
			intent.setClass(getActivity(), ShakeDetailActivity.class);
			startActivity(intent);
			break;

		default:
			break;
		}
	}



}
